package model

import "time"

type Coach struct {
	ID          uint      `gorm:"primaryKey" json:"id"`
	Name        string    `gorm:"size:100;not null" json:"name"`
	Phone       string    `gorm:"size:20;uniqueIndex;not null" json:"phone"`
	Email       string    `gorm:"size:100" json:"email"`
	Gender      string    `gorm:"size:10" json:"gender"`
	Specialty   string    `gorm:"size:200" json:"specialty"`   // 专长
	Experience  int       `json:"experience"`                  // 从业年限
	Certificate string    `gorm:"size:500" json:"certificate"` // 证书
	Status      int       `gorm:"default:1" json:"status"`     // 1:在职 0:离职
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
}

type CoachCreateReq struct {
	Name        string `json:"name" binding:"required"`
	Phone       string `json:"phone" binding:"required"`
	Email       string `json:"email"`
	Gender      string `json:"gender"`
	Specialty   string `json:"specialty"`
	Experience  int    `json:"experience"`
	Certificate string `json:"certificate"`
}

type CoachUpdateReq struct {
	Name        string `json:"name"`
	Email       string `json:"email"`
	Gender      string `json:"gender"`
	Specialty   string `json:"specialty"`
	Experience  *int   `json:"experience"`
	Certificate string `json:"certificate"`
	Status      *int   `json:"status"`
}
